<template>
  <a-tabs @change="callback" type="card">
    <a-tab-pane tab="当前驱动" key="current">
      <current-temp ref="current"></current-temp>
    </a-tab-pane>
    <a-tab-pane tab="驱动一览" key="table">
      <drive-table ref="table"></drive-table>
    </a-tab-pane>
  </a-tabs>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { Current as CurrentTemp, DriveTable } from "./components";
@Component({
  name: "Drive",
  components: {
    CurrentTemp,
    DriveTable
  }
})
export default class Drive extends Vue {
  callback(key: any) {
    this.$nextTick(() => {
      const vm: any = this.$refs[key];
      vm.initList();
    });
  }
}
</script>

<style lang="less" scoped></style>
